package com.yunxi.service.localService.impl;

import com.github.pagehelper.PageInfo;
import com.yunxi.core.page.PageHelperPlus;
import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.core.util.BeanTools;
import com.yunxi.dao.order.OrderActualSalesMapper;
import com.yunxi.model.order.OrderActualSales;
import com.yunxi.order.pojo.OrderActualSalesVO;
import com.yunxi.sat.pojo.HandleVehicleVO;
import com.yunxi.service.localService.OrderActualSalesService;
import com.yunxi.vip.pojo.VipManageVO;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单实销表 服务实现类
 * </p>
 *
 * @author 
 * @since 2019-07-18
 */
@Service
public class OrderActualSalesServiceImpl extends ServiceImplPlus<OrderActualSalesMapper, OrderActualSales> implements OrderActualSalesService {

   @Override
   public OrderActualSalesVO loadDetail(String orderCustomerNo) {
     return baseMapper.load(orderCustomerNo);
   }

   @Override
   public String getPackgeNameByPackgeCode(String customPackCode) {
      return baseMapper.getPackgeNameByPackgeCode(customPackCode);
   }

   @Override
   public PageInfo<OrderActualSalesVO> pageByVip(VipManageVO vo, Integer pageNum, Integer pageSize) {
      Map map = BeanTools.bean2map(vo);
      PageHelperPlus.startPage(pageNum,pageSize);
      List<OrderActualSalesVO> list = baseMapper.pageByVip(map);
      PageInfo<OrderActualSalesVO> pageInfo = new PageInfo<OrderActualSalesVO>(list);
      return pageInfo;
   }
}
